Skip to content

Conversation

@RupertSaxton
Copy link

No description provided.

gem_city.rb Outdated
@people = {
thieves: 5,
officers: 1
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these two values really need to be joined into Hash? Consider the simplification if they weren't.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had used it because that's the way it came but having them as instance variables and using attr_accessor is much nicer

gem_city.rb Outdated
@population = 50
end

def thieves(thieves_number = @people[:thieves])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Officers have both a getter and setter method, but thieves just have this hybrid method. I think two methods is better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants